  /**
   * Generate time : 2012-06-13 16:16:20
   * Version : 1.0.1.V20070717
   */
package com.baosight.sczx.zm.ct.domain;

import com.baosight.iplat4j.core.ei.EiColumn;
import com.baosight.iplat4j.ep.DaoEPBase;
import java.util.HashMap;
import java.util.Map;
import com.baosight.iplat4j.util.StringUtils;
/**
 * ZMCTSmsModel 
 *  
 */
public class ZMCTSmsModel extends DaoEPBase {

	private String fdKeyId = " ";		/* FD_KEY_ID*/
	private String fdModelName = " ";		/* 模板名称*/
	private String fdSmsType = " ";		/* 消息类型*/
	private String fdDs = " ";		/* 数据源选择*/
	private String fdSql = " ";		/* sql编辑*/
	private String fdModelContent = " ";		/* 模板内容*/
	private String fdStatus = " ";		/* 状态*/

	/**
	 * initialize the metadata 
	 */
	public void initMetaData() {
		EiColumn eiColumn;
		
	eiColumn = new EiColumn("fdKeyId");
	eiColumn.setPrimaryKey(true);
	eiColumn.setFieldLength(32);	
	eiColumn.setDescName("FD_KEY_ID");
	eiMetadata.addMeta(eiColumn);
	
	eiColumn = new EiColumn("fdModelName");
	eiColumn.setFieldLength(30);	
	eiColumn.setDescName("模板名称");
	eiMetadata.addMeta(eiColumn);
	
	eiColumn = new EiColumn("fdSmsType");
	eiColumn.setFieldLength(30);	
	eiColumn.setDescName("消息类型");
	eiMetadata.addMeta(eiColumn);
	
	eiColumn = new EiColumn("fdDs");
	eiColumn.setFieldLength(50);	
	eiColumn.setDescName("数据源选择");
	eiMetadata.addMeta(eiColumn);
	
	eiColumn = new EiColumn("fdSql");
	eiColumn.setFieldLength(2000);	
	eiColumn.setDescName("sql编辑");
	eiMetadata.addMeta(eiColumn);
	
	eiColumn = new EiColumn("fdModelContent");
	eiColumn.setFieldLength(200);	
	eiColumn.setDescName("模板内容");
	eiMetadata.addMeta(eiColumn);
	
	eiColumn = new EiColumn("fdStatus");
	eiColumn.setFieldLength(10);	
	eiColumn.setDescName("状态");
	eiMetadata.addMeta(eiColumn);
	

	}
	/**
	 * the constructor
	 */
	public ZMCTSmsModel() {
		initMetaData();
	}
	
	/**
	 * get the fdKeyId - FD_KEY_ID
	 * @return the fdKeyId
	 */
	public String getFdKeyId() {
		return this.fdKeyId;
	}
	
	/**
	 * set the fdKeyId - FD_KEY_ID
	 */
	public void setFdKeyId(String fdKeyId) {
		this.fdKeyId = fdKeyId;
	}
	
	/**
	 * get the fdModelName - 模板名称
	 * @return the fdModelName
	 */
	public String getFdModelName() {
		return this.fdModelName;
	}
	
	/**
	 * set the fdModelName - 模板名称
	 */
	public void setFdModelName(String fdModelName) {
		this.fdModelName = fdModelName;
	}
	
	/**
	 * get the fdSmsType - 消息类型
	 * @return the fdSmsType
	 */
	public String getFdSmsType() {
		return this.fdSmsType;
	}
	
	/**
	 * set the fdSmsType - 消息类型
	 */
	public void setFdSmsType(String fdSmsType) {
		this.fdSmsType = fdSmsType;
	}
	
	/**
	 * get the fdDs - 数据源选择
	 * @return the fdDs
	 */
	public String getFdDs() {
		return this.fdDs;
	}
	
	/**
	 * set the fdDs - 数据源选择
	 */
	public void setFdDs(String fdDs) {
		this.fdDs = fdDs;
	}
	
	/**
	 * get the fdSql - sql编辑
	 * @return the fdSql
	 */
	public String getFdSql() {
		return this.fdSql;
	}
	
	/**
	 * set the fdSql - sql编辑
	 */
	public void setFdSql(String fdSql) {
		this.fdSql = fdSql;
	}
	
	/**
	 * get the fdModelContent - 模板内容
	 * @return the fdModelContent
	 */
	public String getFdModelContent() {
		return this.fdModelContent;
	}
	
	/**
	 * set the fdModelContent - 模板内容
	 */
	public void setFdModelContent(String fdModelContent) {
		this.fdModelContent = fdModelContent;
	}
	
	/**
	 * get the fdStatus - 状态
	 * @return the fdStatus
	 */
	public String getFdStatus() {
		return this.fdStatus;
	}
	
	/**
	 * set the fdStatus - 状态
	 */
	public void setFdStatus(String fdStatus) {
		this.fdStatus = fdStatus;
	}
	
	/**
	 * get the value from Map
	 */
	public void fromMap(Map map) {
	
		setFdKeyId(StringUtils.defaultIfEmpty(StringUtils.toString(map.get("fdKeyId")), fdKeyId));
		setFdModelName(StringUtils.defaultIfEmpty(StringUtils.toString(map.get("fdModelName")), fdModelName));
		setFdSmsType(StringUtils.defaultIfEmpty(StringUtils.toString(map.get("fdSmsType")), fdSmsType));
		setFdDs(StringUtils.defaultIfEmpty(StringUtils.toString(map.get("fdDs")), fdDs));
		setFdSql(StringUtils.defaultIfEmpty(StringUtils.toString(map.get("fdSql")), fdSql));
		setFdModelContent(StringUtils.defaultIfEmpty(StringUtils.toString(map.get("fdModelContent")), fdModelContent));
		setFdStatus(StringUtils.defaultIfEmpty(StringUtils.toString(map.get("fdStatus")), fdStatus));
	}
	
	/**
	 * set the value to Map
	 */
	public Map toMap() {
		
		Map map = new HashMap();
			map.put("fdKeyId",StringUtils.toString(fdKeyId, eiMetadata.getMeta("fdKeyId")));	
			map.put("fdModelName",StringUtils.toString(fdModelName, eiMetadata.getMeta("fdModelName")));	
			map.put("fdSmsType",StringUtils.toString(fdSmsType, eiMetadata.getMeta("fdSmsType")));	
			map.put("fdDs",StringUtils.toString(fdDs, eiMetadata.getMeta("fdDs")));	
			map.put("fdSql",StringUtils.toString(fdSql, eiMetadata.getMeta("fdSql")));	
			map.put("fdModelContent",StringUtils.toString(fdModelContent, eiMetadata.getMeta("fdModelContent")));	
			map.put("fdStatus",StringUtils.toString(fdStatus, eiMetadata.getMeta("fdStatus")));	
			
		return map;
	
	}
}